﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MgmCategories_ListCategories : System.Web.UI.MobileControls.MobilePage
{

    protected void Page_Load(object sender, EventArgs e)
    {
        
        if (!Page.IsPostBack)
        {
            SkynetProxy.SkynetLibraryService proxy = new SkynetProxy.SkynetLibraryService();

            if (this.ActiveForm == this.FormMaster)
            {
                SkynetProxy.ExamCategory[] exams = proxy.FindExamCategories(SkynetProxy.DCExamFindCategoryOperation.FindAll, true);
                olCategories.DataSource = exams;
                //      olCategories.LabelField = "Exam Categories";
                olCategories.DataBind();
            }
            if (this.ActiveForm == this.FormDetail)
            {                                
                SkynetProxy.ExamCategory[] exans = proxy.FindExamCategories(SkynetProxy.DCExamFindCategoryOperation.FindAll, true);
                this.olDetailCategories.DataSource = exans;
                olCategories.LabelField = "Title";
                this.olDetailCategories.DataBind();
            }            
        }

    }

    

}